package com.oncecloud.devops.client.dao;

import java.sql.SQLException;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.oncecloud.devops.client.entity.Env;
import com.oncecloud.devops.client.entity.EnvUser;

/**
 * 环境用户接口
 * @author xzg
 *
 */
public interface EnvUserMapper {
	/**
	 * @param id
	 * @return
	 */
	public EnvUser getUserEnvById(Integer id);
	
	/**
	 * @param userId
	 * @return
	 * @throws SQLException
	 */
	public List<Env> getEnvByUserId(Integer userId) throws SQLException;

	/**
	 * @param id
	 * @return
	 */
	public int deleteEnvById(Integer id) throws SQLException;
	
	/**
	 * @param envUser
	 * @return
	 * @throws SQLException
	 */
	public int insertEnvUser(EnvUser envUser) throws SQLException;
	
	/**
	 * 
	 * @param envUser
	 * @return
	 * @throws SQLException
	 */
	public int updateEnvUserById(EnvUser envUser)throws SQLException;

	/**
	 * @param userId
	 * @throws SQLException
	 */
	public void deleteEnvByUserId(@Param("userId") Integer userId) throws SQLException;
}
